package com.oceanread.cn.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.oceanread.cn.entity.Sediment;
import com.oceanread.cn.entity.SideScan;
import com.oceanread.cn.mapper.SedimentMapper;
import com.oceanread.cn.mapper.SideScanMapper;
import com.oceanread.cn.service.ISedimentService;
import com.oceanread.cn.service.ISideScanService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ISedimentServiceImpl extends ServiceImpl<SedimentMapper, Sediment> implements ISedimentService {
    public List<Sediment> getall() {
        return baseMapper.getall();
    }

    @Override
    public List<Sediment> query(int page, int size, String key, String value) {
        return baseMapper.query((page - 1) * size, size, key, value);
    }
    @Override
    public List<Sediment> equal(String key, String value) {
        return baseMapper.equal(key, value);
    }

    @Override
    public List<Sediment> getTablelist(int page, int size) {
        return baseMapper.getTablelist((page - 1) * size, size);
    }

    public Integer getnum() {
        return baseMapper.getnum();
    }

    public Integer getnumquery(String key, String value) {
        return baseMapper.getnumquery(key, value);
    }

    @Override
    public int insert(String PrjCode, String Code, String Name, String Area, String Time,
                      String CenterCoordinateX, String CenterCoordinateY, String CenterCoordinateZ,String url) {
        return baseMapper.insert( PrjCode,  Code,  Name,  Area,  Time,
                 CenterCoordinateX,  CenterCoordinateY,  CenterCoordinateZ,url);
    }
    @Override
    public Integer update(Sediment sediment) {
        return baseMapper.update(sediment.getSysid(),sediment.getPrjCode(),sediment.getCode(),sediment.getName(),sediment.getArea(),sediment.getTime(),
                sediment.getCenterCoordinateX(),sediment.getCenterCoordinateY(),sediment.getCenterCoordinateZ(),sediment.getUrl());
    }

    public Integer delete(int sysid) {
        return baseMapper.delete(sysid);
    }

}
